/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nxlv2.nomad.businessobjects;

/**
 *
 * @author Xavier
 */
public class DetailDemande {
    private int idBase; 
    private int idAppli; 
    private int quantite;
    private TypeDemande typeDemande;

    public DetailDemande() {
    }
    
    /**
     * 
     * @param idBase
     * @param idAppli
     * @param quantite 
     * @param typeDemande 
     */
    public DetailDemande(int idBase, int idAppli, int quantite, TypeDemande typeDemande) {
        this.idBase = idBase;
        this.idAppli = idAppli;
        this.quantite = quantite;
        this.typeDemande = typeDemande;
    }

    /**
     * 
     * @return idBase
     */
    public int getIdBase() {
        return idBase;
    }

    /**
     * 
     * @param idBase 
     */
    public void setIdBase(int idBase) {
        this.idBase = idBase;
    }

    /**
     * 
     * @return idAppli
     */
    public int getIdAppli() {
        return idAppli;
    }

    /**
     * 
     * @param idAppli 
     */
    public void setIdAppli(int idAppli) {
        this.idAppli = idAppli;
    }

    /**
     * 
     * @return quantite
     */
    public int getQuantite() {
        return quantite;
    }

    /**
     * 
     * @param quantite 
     */
    public void setQuantite(int quantite) {
        this.quantite = quantite;
    }
    
    /**
     * 
     * @return typeDemande
     */
    public TypeDemande getTypeDemande() {
        return typeDemande;
    }

    /**
     * 
     * @param typeDemande 
     */
    public void setTypeDemande(TypeDemande typeDemande) {
        this.typeDemande = typeDemande;
    }

    /**
     * 
     * @return String
     */
    @Override
    public String toString() {
        return "DetailDemande{" + "idBase=" + idBase + ", idAppli=" + idAppli + ", quantite=" + quantite + ", typeDemande="+ typeDemande +'}';
    }
   
    public String toJSONString(){
        
        return "{\"idBase\":\""+ idBase +"\",\"idAppli\":\""+ idAppli +"\",\"quantite\":\""+ quantite +"\",\"typeDemande\":\""+ typeDemande.getId() +"\"}";
    }
}
